﻿//06.Write a program to convert binary numbers to hexadecimal numbers (directly).

using System;
using System.Collections.Generic;

namespace BinaryToHexadecimal
{
    class BinaryToHexadecimal
    {
        static void Main()
        {
            Console.Write("Enter a hexadecimal number: ");
            string binNumber = Console.ReadLine();

            string hexNum = Convert.ToInt32(binNumber, 2).ToString("X");
            Console.WriteLine("Binary value = {0}, hexadecimal value = {1}.", binNumber, hexNum);
        }
    }
}
